<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ page import="org.hibernate.SessionFactory"%>
<%@ page import="org.hibernate.Session"%>
<%@ page import="java.util.List"%>
<%@ page import="hibernate.model.*"%>
<%@ page import="hibernate.util.HibernateUtil"%>
<%@ page import="hibernate.method.*"%>
	<div class="page-header">
	<h2 class="page-title">Nowa rezerwacja</h2>
</div>

<br />

<div id="content">
<%
						SessionFactory sessionFactory = HibernateUtil
								.getSessionAnnotationFactory();
						Session s = sessionFactory.openSession();
						s.beginTransaction();
						LocalMethods lm = new LocalMethods();
							response.setContentType("text/html");
							List<Local> locals = lm.listAllLocals(sessionFactory, s);
				
out.println("Wybierz lokal: <br />");
for (Local l : locals){
out.println("<a class=\"locals\" id=\""+ l.getLocal_id() + "\" href=\"../social/reservationScheduler.jsp?local_id="+l.getLocal_id()+"\">" + l.getCountry()+", "+l.getStreet()+" "+ l.getLocal_number() + "</a>");
out.println("<br />");
}%>

<br />
</div>